home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/awk -f
- # -*- awk -*-
- #
- # $Header: /usr/bfr/src/test/RCS/fts-f-strip-cmts,v 1.1 1995/01/18 17:39:14 abel Exp $
- #
- #********************************************
- #
- # remove FORTRAN comments
- #
- #********************************************
- #
- # Written by Alexander L. Belikoff, 1994
- # Copyright (C)1994 Alexander L. Belikoff
- #
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or
- # (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- #********************************************
- #
- # $Log: fts-f-strip-cmts,v $
- # Revision 1.1 1995/01/18 17:39:14 abel
- # Initial revision
- #
- #
- #********************************************
-
-
- # strip all FORTRAN comments end empty lines
-
-
- # skip all full-line comments
-
- $0 ~ /^[^0-9 ]/ || $0 ~ /^[ \t]*$/ {
- next
- }
-
-
- # now handle all the cases with '!': either ... ! ... or '...' ... ! ...
-
- $0 ~ /!/ && $0 !~ /^[^\']*\'[^\']*!/ {
- split($f, line, "!")
- $0 = line[1]
- }
-
-
- { print }
-
- # end of $Source: /usr/bfr/src/test/RCS/fts-f-strip-cmts,v $
-